package com.zhijian.medical.enums.diagnose.report;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 结直肠枚举
 */
@Slf4j
public class ColorectalEnum {

    /**
     * 肿瘤为孩子
     */
    @AllArgsConstructor
    @Getter
    public enum PositionEnum {
        // 盲肠、升结肠、肝曲、横结肠、右半结肠、左半结肠、脾曲、降结肠、乙状结肠、直肠乙状结肠、直肠、回盲瓣、结肠，非特指定、不能确定
        BLOODY_ILEUM("bloody_ileum", "盲肠"),
        UPPER_ILEUM("upper_ileum", "升结肠"),
        HEPATIC_CURVE("hepatic_curve", "肝曲"),
        HORIZONTAL_ILEUM("horizontal_ileum", "横结肠"),
        RIGHT_HALF_ILEUM("right_half_ileum", "右半结肠"),
        LEFT_HALF_ILEUM("left_half_ileum", "左半结肠"),
        PERITON_CURVE("periton_curve", "脾曲"),
        DOWN_ILEUM("down_ileum", "降结肠"),
        Y_ILEUM("y_ileum", "乙状结肠"),
        Y_ILEUM_RECTO_RECTAL("y_ileum_recto_rectal", "直肠乙状结肠"),
        RECTO_RECTAL("recto_rectal", "直肠"),
        RETRO_BLADDER("retro_bladder", "回盲瓣"),
        ILEO_ILEUM("ileo_ileum", "结肠"),
        ILEO_ILEUM_NOT_SPECIFY("ileo_ileum", "结肠,非特指定"),
        UNKNOWN("unknown", "不能确定");

        private final String key;
        private final String desc;


        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(PositionEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }


    /**
     * 术前辅助治疗
     */
    @AllArgsConstructor
    @Getter
    public enum AssistanceEnum {
        // 有、无、未知
        YES("yes", "有"),
        NO("no", "无"),
        UNKNOWN("unknown", "未知");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(AssistanceEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 标本名称
     */
    @AllArgsConstructor
    @Getter
    public enum SpecimenEnum {
        // 右半结肠切除标本、左半结肠切除标本、乙状结肠切除标本、直肠切除标本、其他
        RIGHT_HALF_ILEUM_REMOVAL("right_half_ileum_removal", "右半结肠切除标本"),
        LEFT_HALF_ILEUM_REMOVAL("left_half_ileum_removal", "左半结肠切除标本"),
        Y_ILEUM_REMOVAL("y_ileum_removal", "乙状结肠切除标本"),
        RECTO_RECTAL_REMOVAL("recto_rectal_removal", "直肠切除标本"),
        OTHER("other", "其他");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(SpecimenEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }


    /**
     * 肿瘤大小
     */
    @AllArgsConstructor
    @Getter
    public enum TumorSizeEnum {

        S3("3.5x2.0", "3.5x2.0"),
        S20("20x16x3", "20x16x3");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(TumorSizeEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 巨检分型
     */
    @AllArgsConstructor
    @Getter
    public enum MacroscopicClassificationEnum {

        PROGRESS("progress", "进展期结直肠癌", MacroscopicClassificationProgressEnum.getList()),
        EARLY("early", "早期结直肠癌", MacroscopicclassificationEarlyEnum.getList());

        private final String key;
        private final String desc;
        private final List<MappingEnum<String, String>> child;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(MacroscopicClassificationEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), e.getChild()))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }

    }

    /**
     * 巨检分型-进展期结直肠癌
     */
    @AllArgsConstructor
    @Getter
    public enum MacroscopicClassificationProgressEnum {
        // 溃疡型、隆起型、浸润型、缩窄型、其他
        BURRSTICK_FORMATION_TYPE("burstick_formation_type", "溃疡型"),
        UPLIFT_FORMATION_TYPE("uplift_formation_type", "隆起型"),
        INFILTRATION_TYPE("infiltation_type", "浸润型"),
        SHRINKAGE_TYPE("shrinkage_type", "缩窄型"),
        OTHER("other", "其他");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(MacroscopicClassificationProgressEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 巨检分型-早期结直肠癌
     */
    @AllArgsConstructor
    @Getter
    public enum MacroscopicclassificationEarlyEnum {

        TITIAN_UPLIFT_TYPE("titian_uplift_type", "有蒂隆起型（0-Ip）"),
        UNTAMED_RAISED_TYPE("untamed_raised_type", "无蒂隆起型（0-Is）"),
        SHALLOW_UPLIFT_TYPE("shallow_uplift_type", "表浅隆起型（0-IIa）"),
        SHALLOW_FLAT_TYPE("shallow_flat_type", "表浅平坦型（0-IIb）"),
        SHALLOW_CONCAVE_TYPE("shallow_concave_type", "表浅凹陷型（0-IIc）"),
        UPLIFT_CONCAVE_TYPE("uplift_concave_type", "表浅隆起型+表浅凹陷型（0-IIa-IIc型）"),
        CONCAVE_TYPE("concave_type", "凹陷型（0-III）");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(MacroscopicclassificationEarlyEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }


    /**
     * 组织学类型
     */
    @AllArgsConstructor
    @Getter
    public enum HistologicalTypeEnum {

        MALIGNANT_EPITHELIAL_TUMOR("malignant_epithelial_tumor", "恶性上皮性肿瘤", MalignantEpithelialTumorEnum.getList()),
        NEUROENDOCRINE("neuroendocrine", "神经内分泌癌", NeuroendocrineEnum.getList()),
        NEUROENDOCRINE_TUMORS("neuroendocrine_tumors", "神经内分泌肿瘤", NeuroendocrineTumorsEnum.getList());

        private final String key;
        private final String desc;
        private final List<MappingEnum<String, String>> child;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(HistologicalTypeEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), e.getChild()))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 组织学分型-恶性上皮性肿瘤
     */
    @AllArgsConstructor
    @Getter
    public enum MalignantEpithelialTumorEnum {
        // 腺癌、锯齿状腺癌、腺瘤样腺癌、微乳头状腺癌、黏液腺癌、低黏附性腺癌、印戒细胞癌、髓样腺癌、腺鳞癌、未分化癌,NOS、伴肉瘤样成分的癌(癌伴肉瘤样成分)
        ADENOCARCINOMA("adenocarcinoma", "腺癌"),
        CARCINOMATOID_ALOID_TUMOR("carcinomatoid_alooid_tumor", "锯齿状腺癌"),
        AMYLOID_ALOID_TUMOR("amyoide_alooid_tumor", "腺瘤样腺癌"),
        MICROCARCINOMATOID_ALOID_TUMOR("microcarcinomatoid_alooid_tumor", "微乳头状腺癌"),
        PLASTICITY_ADENOCARCINOMA("plasticity_adenocarcinoma", "黏液腺癌"),
        LOW_PLASTICITY_ADENOCARCINOMA("low_plasticity_adenocarcinoma", "低黏附性腺癌"),
        PLASTICITY_ADENOCARCINOMA_WITH_RADIATION_HISTOLOGY("plasticity_adenocarcinoma_with_radiation_histology", "印戒细胞癌"),
        MICROSOMATOID_ALOID_TUMOR("microsomatoid_alooid_tumor", "髓样腺癌"),
        AMYLOID_ALOID_TUMOR_WITH_RADIATION_HISTOLOGY("amyoide_alooid_tumor_with_radiation_histology", "腺鳞癌"),
        UNKNOWN("unknown", "未分化癌,NOS"),
        CARCINOMATOID_ALOID_TUMOR_WITH_RADIATION_HISTOLOGY("carcinomatoid_alooid_tumor_with_radiation_histology", "伴肉瘤样成分的癌(癌伴肉瘤样成分)");


        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(MalignantEpithelialTumorEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }


    /**
     * 组织学分型-神经内分泌癌
     */
    @AllArgsConstructor
    @Getter
    public enum NeuroendocrineEnum {

        NOS("nos", "神经内分泌癌，NOS"),
        LARGE_CELL_NEUROENDOCRINE("large_cell_neuroendocrine", "大细胞神经内分泌癌"),
        SMALL_CELL_NEUROENDOCRINE("small_cell_neuroendocrine", "小细胞神经内分泌癌"),
        // 混合性神经内分泌-非神经内分泌肿瘤（MiNEN）
        MIXED_NEUROENDOCRINE("mixed_neuroendocrine", "混合性神经内分泌-非神经内分泌肿瘤（MiNEN）");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(NeuroendocrineEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 组织学分型-神经内分泌肿瘤
     */
    @AllArgsConstructor
    @Getter
    public enum NeuroendocrineTumorsEnum {

        NOS("nos", "神经内分泌肿瘤，NOS"),
        LEVEL_1("level_1", "神经内分泌肿瘤，G1"),
        LEVEL_2("level_2", "神经内分泌肿瘤，G2"),
        LEVEL_3("level_3", "神经内分泌肿瘤，G3"),
        // L细胞肿瘤、胰高血糖素样脑生成性肿瘤、PP/PYY 生成性肿瘤、EC细胞(肠嗜铭细胞)类癌、5-轻色胺生成性类癌
        L_CELL_TUMOR("l_cell_tumor", "L细胞肿瘤"),
        P_GLUCOSE_STIMULATING_BRAIN_DERIVED_TUMOR("p_glucose_stimulating_brain_derived_tumor", "胰高血糖素样脑生成性肿瘤"),
        P_PYY_STIMULATING_BRAIN_DERIVED_TUMOR("p_pyy_stimulating_brain_derived_tumor", "PP/PYY 生成性肿瘤"),
        EC_CELL_TUMOR("ec_cell_tumor", "EC细胞(肠嗜铬细胞)类癌"),
        P_GLUCOSE_HISTOLOGY("p_glucose_histology", "5-轻色胺生成性类癌");


        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(NeuroendocrineTumorsEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 病灶-百分比
     */
    @AllArgsConstructor
    @Getter
    public enum PercentageEnum {

        P0(0, "0"),
        P10(10, "10"),
        P20(20, "20"),
        P30(30, "30"),
        P40(40, "40"),
        P50(50, "50"),
        P60(60, "60"),
        P70(70, "70"),
        P80(80, "80"),
        P90(90, "90"),
        P100(100, "100");

        private final Integer key;
        private final String desc;

        private static final List<MappingEnum<Integer, String>> TEMP_MAPPING = Arrays.stream(PercentageEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<Integer, String>> getList() {
            return TEMP_MAPPING;
        }
    }


    /**
     * 组织学分级
     */
    @AllArgsConstructor
    @Getter
    public enum LevelEnum {

        LEVEL_1("level_1", "1级（高分化）"),
        LEVEL_2("level_2", "2级（中分化）"),
        LEVEL_3("level_3", "3级（低分化）"),
        LEVEL_4("level_4", "4级（未分化）"),
        NOT_APPLICABLE("not_applicable", "不适用"),
        UNABLE_TO_EVALUATE("unable_to_evaluate", "无法评估");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(LevelEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }


    /**
     * 肿瘤浸润深度
     */
    @AllArgsConstructor
    @Getter
    public enum VascularEnum {
        // 原发肿瘤无法评价(Tx)、无原发肿瘤证据(T0)、原位癌:局限于上皮内或侵犯粘膜固有层(Tis)、肿瘤侵犯粘膜下层(T1)、肿瘤侵犯固有肌层(T2)、肿瘤侵犯粘膜固有层达周围脂肪组织(T3)、肿瘤穿透脏层腹膜(T4a)、肿瘤直接侵犯或附着于邻近器官或结构(T4b)
        POOR_TUMOR_CANNOT_BE_EVALUATED("por_tumor_cannot_be_evaluated", "原发肿瘤无法评价(Tx)"),
        NO_EVIDENCE("no_evidence", "无原发肿瘤证据(T0)"),
        TUMOR_LOCATED_WITHIN_THE_EPITHELIAL_NEOPLASM("tumor_located_within_the_epithelial_neoplasm", "原位癌:局限于上皮内或侵犯粘膜固有层(Tis)"),
        TUMOR_INVADES_THE_SUBMUCOSAL_LAYER("tumor_invades_the_submucosal_layer", "肿瘤侵犯粘膜下层(T1)"),
        TUMOR_INVADES_THE_INTRINSIC_MUSCLE_LAYER("tumor_invades_the_intrinsic_muscle_layer", "肿瘤侵犯固有肌层(T2)"),
        TUMOR_INVADES_THE_SUBMUCOSAL_LAYER_TO_THE_AROUND_FAT_LAYER("tumor_invades_the_submucosal_layer_to_the_around_fat_layer", "肿瘤穿透固有肌层达周围脂肪组织(T3)"),
        TUMOR_INVASION_OF_THE_ESOPHAGEAL_FIBROUS_MEMBRANE("tumor_invasions_of_the_esophageal_fibrous_membrane", "肿瘤穿透脏层腹膜(T4a)"),
        TUMOR_INVASION_OF_OR_ATTACHED_TO_ADJACENT_STRUCTURES("tumor_invasions_of_or_attached_to_adjacent_structures", "肿瘤直接侵犯或附着于邻近器官或结构(T4b)");


        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(VascularEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 脉管癌栓
     */
    @AllArgsConstructor
    @Getter
    public enum VascularCancerThrombusEnum {

        NOT_YET_SEEN("not_yet_seen", "末见癌栓"),
        VISIBLE("visible", "见癌栓"),
        SUSPICIOUS("suspicious", "可疑"),
        UNABLE_TO_EVALUATE("unable_to_evaluate", "无法评估");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(VascularCancerThrombusEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 神经侵犯
     */
    @AllArgsConstructor
    @Getter
    public enum NeurologicalInvasionEnum {

        NOT_YET_SEEN("not_yet_seen", "未见侵犯"),
        VISIBLE("visible", "见侵犯"),
        SUSPICIOUS("suspicious", "可疑"),
        UNABLE_TO_EVALUATE("unable_to_evaluate", "无法评估");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(NeurologicalInvasionEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 肿瘤出芽
     */
    @AllArgsConstructor
    @Getter
    public enum BuddingEnum {
        // 低级别(0-4)、中级别(5-9)、高级别(≥10)、不适用
        LOW_LEVEL("low_level", "低级别(0-4)"),
        MIDDLE_LEVEL("middle_level", "中级别(5-9)"),
        HIGH_LEVEL("high_level", "高级别(≥10)"),
        NOT_APPLICABLE("not_applicable", "不适用");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(BuddingEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 低分化癌簇
     */
    @AllArgsConstructor
    @Getter
    public enum PoorlyEnum {

        // 低级别(0-4)、中级别(5-9)、高级别(≥10)、不适用
        LOW_LEVEL("low_level", "低级别(0-4)"),
        MIDDLE_LEVEL("middle_level", "中级别(5-9)"),
        HIGH_LEVEL("high_level", "高级别(≥10)"),
        NOT_APPLICABLE("not_applicable", "不适用");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(PoorlyEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }


    /**
     * 网膜组织
     */
    @AllArgsConstructor
    @Getter
    public enum OmentumEnum {
        // 见癌组织直接侵犯、见癌组织转移、未累及
        DIRECTLY_INVOLVEMENT("directly_involvement", "见癌组织直接侵犯"),
        TRANSFERRED("transferred", "见癌组织转移"),
        NOT_INVOLVEMENT("not_involvement", "未累及");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(OmentumEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }


    /**
     * 其他组织
     */
    @AllArgsConstructor
    @Getter
    public enum OtherOrganizationsEnum {
        // 膀胱壁、其他
        URINE_WALL("urine_wall", "膀胱壁"),
        OTHER("other", "其他");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(OtherOrganizationsEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 是否侵犯
     */
    @AllArgsConstructor
    @Getter
    public enum InfringementEnum {
        // 是、否、无法确定
        YES("yes", "是"),
        NO("no", "否"),
        UNABLE_TO_EVALUATE("unable_to_evaluate", "无法确定");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(InfringementEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 两端切缘
     */
    @AllArgsConstructor
    @Getter
    public enum CutEdgesAtBothEndsEnum {

        NO_FOUND("no_found", "未见癌残留"),
        CANCER_INVOLVEMENT("cancer_involvement", "癌组织累及"),
        CANCER_NEAR("cancer_near", "癌组织仅靠标本切缘");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(CutEdgesAtBothEndsEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 近端切缘
     */
    @AllArgsConstructor
    @Getter
    public enum CutEdgesNearEnum {
        // 不能评估、无浸润性癌累及-无腺瘤或上皮内肿瘤/异型增生、无浸润性癌累及-可见腺瘤(低级别上皮内肿瘤/异型增生)、无浸润性癌累及-可见高级别上皮内肿瘤/异型增生或粘膜内癌、浸润性癌累及
        UNABLE_TO_EVALUATE("unable_to_evaluate", "不能评估"),
        VISIBLE_TUMOR_WITHOUT_TUMOR_SUPERFICIAL_TUMOR("visible_tumor_without_tumor_superficial_tumor", "无浸润性癌累及-无腺瘤或上皮内肿瘤/异型增生"),
        VISIBLE_TUMOR_WITH_LOW_LEVEL_TUMOR_SUPERFICIAL_TUMOR("visible_tumor_with_low_level_tumor_superficial_tumor", "无浸润性癌累及-可见腺瘤(低级别上皮内肿瘤/异型增生)"),
        VISIBLE_TUMOR_WITH_HIGH_LEVEL_TUMOR_SUPERFICIAL_TUMOR("visible_tumor_with_high_level_tumor_superficial_tumor", "无浸润性癌累及-可见高级别上皮内肿瘤/异型增生或粘膜内癌"),
        INFRINGEMENT("infringement", "浸润性癌累及");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(CutEdgesNearEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 远端切缘
     */
    @AllArgsConstructor
    @Getter
    public enum CutEdgesFarEnum {
        // 不能评估、无浸润性癌累及-无腺瘤或上皮内肿瘤/异型增生、无浸润性癌累及-可见腺瘤(低级别上皮内肿瘤/异型增生)、无浸润性癌累及-可见高级别上皮内肿瘤/异型增生或粘膜内癌、浸润性癌累及
        UNABLE_TO_EVALUATE("unable_to_evaluate", "不能评估"),
        VISIBLE_TUMOR_WITHOUT_TUMOR_SUPERFICIAL_TUMOR("visible_tumor_without_tumor_superficial_tumor", "无浸润性癌累及-无腺瘤或上皮内肿瘤/异型增生"),
        VISIBLE_TUMOR_WITH_LOW_LEVEL_TUMOR_SUPERFICIAL_TUMOR("visible_tumor_with_low_level_tumor_superficial_tumor", "无浸润性癌累及-可见腺瘤(低级别上皮内肿瘤/异型增生)"),
        VISIBLE_TUMOR_WITH_HIGH_LEVEL_TUMOR_SUPERFICIAL_TUMOR("visible_tumor_with_high_level_tumor_superficial_tumor", "无浸润性癌累及-可见高级别上皮内肿瘤/异型增生或粘膜内癌"),
        INFRINGEMENT("infringement", "浸润性癌累及");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(CutEdgesFarEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 环周切缘
     */
    @AllArgsConstructor
    @Getter
    public enum CircumferentialCuttingEdgeEnum {

        NO_FOUND("no_found", "未见癌残留"),
        ADJACENT_TO_THE_SPECIMEN("adjacent_to_the_specimen", "癌组织紧靠标本切缘"),
        CANCER_INVOLVEMENT("cancer_involvement", "见癌累及"),
        NOT_APPLICABLE("not_applicable", "不适用"),
        // 不能评估
        UNABLE_TO_EVALUATE("unable_to_evaluate", "不能评估");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(CircumferentialCuttingEdgeEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 吻合圈
     */
    @AllArgsConstructor
    @Getter
    public enum MatchingCircleEnum {

        NO_FOUND("no_found", "未见癌残留"),
        ADJACENT_TO_THE_SPECIMEN("adjacent_to_the_specimen", "癌组织紧靠标本切缘"),
        CANCER_INVOLVEMENT("cancer_involvement", "见癌累及"),
        NOT_APPLICABLE("not_applicable", "不适用"),
        UNABLE_TO_EVALUATE("unable_to_evaluate", "不能评估");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(MatchingCircleEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     *  肛门
     */
    @AllArgsConstructor
    @Getter
    public enum AnusEnum {
        // 不能评估、
        UNABLE_TO_EVALUATE("unable_to_evaluate", "不能评估"),
        VISIBLE_TUMOR_WITHOUT_TUMOR_SUPERFICIAL_TUMOR("visible_tumor_without_tumor_superficial_tumor", "无浸润性癌累及-无腺瘤或上皮内肿瘤/异型增生"),
        VISIBLE_TUMOR_WITH_LOW_LEVEL_TUMOR_SUPERFICIAL_TUMOR("visible_tumor_with_low_level_tumor_superficial_tumor", "无浸润性癌累及-可见腺瘤(低级别上皮内肿瘤/异型增生)"),
        VISIBLE_TUMOR_WITH_HIGH_LEVEL_TUMOR_SUPERFICIAL_TUMOR("visible_tumor_with_high_level_tumor_superficial_tumor", "无浸润性癌累及-可见高级别上皮内肿瘤/异型增生或粘膜内癌"),
        INFRINGEMENT("infringement", "浸润性癌累及");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(AnusEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 周围肠黏膜
     */
    @AllArgsConstructor
    @Getter
    public enum SurroundingGastricMucosaEnum {
        // 息肉、穿孔、溃疡、未见特殊、其他
        RADIOTHEMA("radiotherapy", "息肉"),
        BREAK("break", "穿孔"),
        INFECTED("infected", "溃疡"),
        NOT_SPECIAL("not_special", "未见特殊"),
        OTHER("other", "其他");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(SurroundingGastricMucosaEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 阑尾
     */
    @AllArgsConstructor
    @Getter
    public enum AppendixEnum {
        // 未见癌累及、见癌累及、慢性阑尾炎、不能评估、其他
        NOT_CASE_OF_CANCER_INVOLVEMENT("not_case_of_cancer_involvement", "未见癌累及"),
        CASE_OF_CANCER_INVOLVEMENT("case_of_cancer_involvement", "见癌累及"),
        CHRONIC_APPENDICITIS("chronic_appendicitis", "慢性阑尾炎"),
        UNABLE_TO_EVALUATE("unable_to_evaluate", "不能评估"),
        OTHER("other", "其他");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(AppendixEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 淋巴结
     */
    @AllArgsConstructor
    @Getter
    public enum LymphGlandEnum {

        NOT_TRANSFERRED("not_transferred", "未见转移"),
        SEE_TRANSFER("see_transfer", "见转移"),
        ADIPOSE_TISSUE("adipose_tissue", "脂肪组织"),
        GRANULOMATOUS_INFLAMMATION("granulomatous_inflammation", "肉芽肿性炎"),
        OTHER("other", "其他");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(LymphGlandEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 有无癌结节
     */
    @AllArgsConstructor
    @Getter
    public enum HasOrNoEnum {
        // 有、无
        YES("yes", "有"),
        NO("no", "无");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(HasOrNoEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 远处转移
     */
    @AllArgsConstructor
    @Getter
    public enum DistantTransferEnum {
        // Mx未知、cM0临床无远端转移、M1a有1个位置或1个器官转移，无腹膜转移、M1b有2个或更多的位点、器官转移，无腹膜转移、M1c有腹膜转移
        NOT_KNOW("not_know", "Mx未知"),
        CLINICALLY_NO_DISTANT_TRANSFER("clinically_no_distant_transfer", "cM0临床无远端转移"),
        ONE_SITE_OR_ORGAN_TRANSFER("one_site_or_organ_transfer", "M1a有1个位置或1个器官转移，无腹膜转移"),
        TWO_SITE_OR_ORGAN_TRANSFER("two_site_or_organ_transfer", "M1b有2个或更多的位点、器官转移，无腹膜转移"),
        ONE_PERITONEAL_TRANSFER("one_peritonal_transfer", "M1c有腹膜转移");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(DistantTransferEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 免疫组化-肿瘤细胞表达
     */
    @AllArgsConstructor
    @Getter
    public enum ImmunohistochemistryExpressionEnum {

        REDUCE("-", "-"),
        PLUS("+", "+"),
        PLUS2("++", "++"),
        PLUS3("+++", "+++"),
        PLUS_OR_MINUS("±", "±");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(ImmunohistochemistryExpressionEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 免疫组化-其他表达
     */
    @AllArgsConstructor
    @Getter
    public enum ImmunohistochemistryOtherExpressionEnum {

        LYMPHOCYTE_EXPRESSION("lymphocyte_expression", "淋巴细胞表达"),
        VASCULAR_EXPRESSION("vascular_expression", "脉管表达"),
        IMMUNE_CELL_EXPRESSION("immune_cell_expression", "间质免疫细胞表达");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(ImmunohistochemistryOtherExpressionEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }


    /**
     * 免疫组化-分析结果
     */
    @AllArgsConstructor
    @Getter
    public enum ResultEnum {

        REDUCE("-", "-"),
        PLUS("+", "+"),
        PLUS2("++", "++"),
        PLUS3("+++", "+++"),
        PLUS_OR_MINUS("±", "±");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(ResultEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * MMR状态-错配修复蛋白表达
     */
    @AllArgsConstructor
    @Getter
    public enum MmrExpressionEnum {
        // 表达未见丢失、MLH1表达可见丢失、PMS2表达可见丢失、HSH2表达可见丢失、MSH6表达可见丢失
        NOT_LOST("not_lost", "表达未见丢失"),
        MLH1_LOST("mlh1_lost", "MLH1表达可见丢失"),
        PMS2_LOST("pms2_lost", "PMS2表达可见丢失"),
        HSH2_LOST("hsh2_lost", "HSH2表达可见丢失"),
        MSH6_LOST("msh6_lost", "MSH6表达可见丢失");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(MmrExpressionEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * MMR状态-状态
     */
    @AllArgsConstructor
    @Getter
    public enum MmrStatusEnum {
        // 错配修复功能缺陷(dMMR)、错配修复功能完整(pMMR)
        DEGRADATION_OF_MMR("degradation_of_mmr", "错配修复功能缺陷(dMMR)"),
        PERFECT_MMR("perfect_mmr", "错配修复功能完整(pMMR)");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(MmrStatusEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 原位杂交-分析结果
     */
    @AllArgsConstructor
    @Getter
    public enum InSituHybridizationExpressionEnum {

        PLUS("+", "+"),
        REDUCE("-", "-"),
        ZERO("0", "0"),
        PLUS1("1+", "1+"),
        PLUS2("2+", "2+"),
        PLUS3("3+", "3+"),
        PLUS_OR_MINUS("±", "±");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(InSituHybridizationExpressionEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 特殊染色-分析结果
     */
    @AllArgsConstructor
    @Getter
    public enum SpecialEnum {

        REDUCE("-", "-"),
        PLUS("+", "+");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(SpecialEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 其他送检组织
     */
    @AllArgsConstructor
    @Getter
    public enum OtherInspectionOrganizationsEnum {

        GASTRIC_TISSUE("gastric_tissue", "胃组织"),
        ANASTOMOTIC_SITE_NEAR_END("anastomotic_site_near_end", "吻合口近端"),
        ANASTOMOTIC_SITE_REMOTE_END("anastomotic_site_remote_end", "吻合口远端");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(OtherInspectionOrganizationsEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 病理分期-TNM分期
     */
    @AllArgsConstructor
    @Getter
    public enum LesionTnmStageEnum {

        YP("yp", "yp"),
        P("p", "p");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(LesionTnmStageEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 病理分期-T
     */
    @AllArgsConstructor
    @Getter
    public enum LesionTEnum {

        Tx("Tx", "Tx"),
        T0("T0", "T0"),
        TS("Tis", "Tis"),
        T1MI("T1mi", "T1mi"),
        T1A("T1a", "T1a"),
        T1B("T1b", "T1b"),
        T1C("T1c", "T1c"),
        T2("T2", "T2"),
        T2A("T2a", "T2a"),
        T2B("T2b", "T2b"),
        T3("T3", "T3"),
        T4("T4", "T4");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(LesionTEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 病理分期-N
     */
    @AllArgsConstructor
    @Getter
    public enum LesionNEnum {

        NX("Nx", "Nx"),
        N0("N0", "N0"),
        N1("N1", "N1"),
        N2("N2", "N2"),
        N3("N3", "N3");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(LesionNEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 病理分期-M
     */
    @AllArgsConstructor
    @Getter
    public enum LesionMEnum {

        MX("Mx", "Mx"),
        CM0("cM0", "cM0"),
        M1A("M1a", "M1a"),
        M1B("M1b", "M1b"),
        M1C("M1c", "M1c");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(LesionMEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }

    /**
     * 病理分期-总分期
     */
    @AllArgsConstructor
    @Getter
    public enum LesionTotalInstallmentEnum {

        N0("0", "0"),
        IA1("IA1", "IA1"),
        IA2("IA2", "IA2"),
        IA3("IA3", "IA3"),
        IB("IB", "IB"),
        IIA("IIA", "IIA"),
        IIB("IIB", "IIB"),
        IIIA("IIIA", "IIIA"),
        IIIB("IIIB", "IIIB"),
        IIIC("IIIC", "IIIC"),
        IVA("IVA", "IVA"),
        IVB("IVB", "IVB");

        private final String key;
        private final String desc;

        private static final List<MappingEnum<String, String>> TEMP_MAPPING = Arrays.stream(LesionTotalInstallmentEnum.values())
                .map(e -> new MappingEnum<>(e.getKey(), e.getDesc(), null))
                .collect(Collectors.toList());

        public static List<MappingEnum<String, String>> getList() {
            return TEMP_MAPPING;
        }
    }
}
